package com.vimi8.chick.plugins.module;

import android.content.Context;
import android.content.Intent;

import com.alibaba.weex.plugin.annotation.WeexModule;
import com.taobao.weex.annotation.JSMethod;
import com.taobao.weex.common.WXModule;
import com.vimi8.chick.plugins.activity.MonitorActivity;

@WeexModule(name = "vmMonitor", lazyLoad = true)
public class MonitorModule extends WXModule {

    @JSMethod
    public void openUrl(String url, String title) {
        Context context = mWXSDKInstance.getContext();
        Intent intent = new Intent(context, MonitorActivity.class);
        intent.putExtra("url", url);
        intent.putExtra("title", title);
        context.startActivity(intent);
    }
}
